<%--
  Created by IntelliJ IDEA.
  User: X.Y鑫
  Date: 2021/3/16
  Time: 9:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" isELIgnored="false" %>
<html>
<head>
    <title>AJAX的数据交互</title>
    <meta charset="utf-8">
    <script type="text/javascript">
        function createAJAXObject() {
            // 创建XMLHttpRequest对象
            let xhr = new XMLHttpRequest();
            xhr.open("get","ajax?id=5&name=zhangsan",true);
            xhr.send();
        }
    </script>
</head>
<body>
    <button id="btn" onclick="createAJAXObject()">点我</button>
</body>
</html>
